package com.example.export.util;

public class ResultAo<T> {

    private String message;

    private T data;

    private Boolean success;

    public ResultAo(String message, T data) {
        this.message = message;
        this.data = data;
    }

    public ResultAo(String message, T data, boolean result) {
        this.message = message;
        this.data = data;
        this.success = result;
    }
    public ResultAo success() {
        this.success = true;
        return  this;
    }
    public ResultAo fail() {
        this.success = false;
        return  this;
    }

    public ResultAo(String message) {
        this.message = message;
    }

    public ResultAo() {
    }




    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    public T getData() {
        return data;
    }

    public void setData(T data) {
        this.data = data;
    }

    public Boolean getSuccess() {
        return success;
    }

    public void setSuccess(Boolean success) {
        this.success = success;
    }
}
